package com.cdgeekcamp.redas.lib.core.api;

import java.util.LinkedHashMap;
import java.util.Map;

public class ApiResponseMap<K, V> extends ApiResponse {
    private Map<K, V> result;

    public ApiResponseMap() {
        result = new LinkedHashMap<>();
    }

    public ApiResponseMap(ResponseCode code, String message) {
        super(code, message);
        result = new LinkedHashMap<>();
    }

    public Map<K, V> getResult() {
        return result;
    }

    public void setResult(Map<K, V> result) {
        this.result = result;
    }

    public void addKeyAndValue(K key, V value) {
        result.put(key, value);
    }
}
